package acm.蓝桥5;

import java.util.Scanner;

public class 签到提 {
    static long day=24*60*60*1000;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        long time = sc.nextLong();
        time%=day;
        int h= (int) (time/3600000);
        int m= (int) (time%3600000/60000);
        int s= (int) (time%60000/1000);
        System.out.printf("%02d:%02d:%02d",h,m,s);
    }
}
